<template>
  <div id="nav-bar" :style="styleColor">
    <div class="left">
      <slot name="left"></slot>
    </div>
    <div class="center">
      <slot name="center"></slot>
    </div>
    <div class="right">
      <slot name="right"></slot>
    </div>
  </div>
</template>
<script>
export default {
  name: "NavBar",
  props: {
    backgroundColor: {
      type: String,
      default: "red"
    },
    textColor: {
      type: String,
      default: "#fff"
    }
  },
  data() {
    return {};
  },
  methods: {},
  computed: {
    styleColor() {
      return { backgroundColor: this.backgroundColor, color: this.textColor };
    }
  }
};
</script>
<style>
#nav-bar {
  display: flex;
  position: fixed;
  z-index: 9999;
  width: 100vw;
}
.left,
.right {
  flex: 1;
  flex-shrink: 0;
}
.center {
  flex: 3;
}
.left,
.right,
.center {
  line-height: 40px;
  text-align: center;
}
</style>
